<?php
/* @var $this WineController */
/* @var $model Wine */
/* @var $form CActiveForm */
?>

<?php
$vintner = $this->vintnersToArray(Vintner::model()->findAll());
?>

<div class="form">

    <?php $form=$this->beginWidget('CActiveForm', array(
        'id'=>'wine-form',
        'enableAjaxValidation'=>false,
    )); ?>

    <!--<p class="note">Fields with <span class="required">*</span> are required.</p>-->

    <?php echo $form->errorSummary($model); ?>

    <div class="block">

        <div class="row">
            <?php echo $form->labelEx($model,'amount'); ?>
            <?php echo $form->textField($model,'amount',array('size'=>4,'maxlength'=>20, 'disabled'=>true)); ?>
            <?php echo $form->error($model,'amount'); ?>
        </div>

        <!--<br>-->

        <div class="row">
            <?php echo $form->labelEx($model,'product_information'); ?>
            <?php echo $form->textField($model,'product_information',array('size'=>60,'maxlength'=>500)); ?>
            <?php echo $form->error($model,'product_information'); ?>
        </div>


        <!--<br>-->
        <!--    </div>-->

        <!--    <div class="block2">-->

        <div class="row">
            <?php echo $form->labelEx($model,'vintner_id'); ?>
            <?php
            echo $form->dropDownList($model,'vintner_id',$vintner, array(
                'prompt' => '-- Winzer wählen --'
            ));
            ?>
            <?php echo $form->error($model,'vintner_id'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model,'supplier_id'); ?>
            <?php
            echo $form->dropDownList($model,'supplier_id',$vintner, array(
                'prompt' => '-- Lieferant wählen --'
            ));
            ?>
            <?php echo $form->error($model,'supplier_id'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model,'country'); ?>
            <?php echo $form->textField($model,'country',array('size'=>60,'maxlength'=>200)); ?>
            <?php echo $form->error($model,'country'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model,'area'); ?>
            <?php echo $form->textField($model,'area',array('size'=>60,'maxlength'=>200)); ?>
            <?php echo $form->error($model,'area'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model,'section'); ?>
            <?php echo $form->textField($model,'section',array('size'=>60,'maxlength'=>200)); ?>
            <?php echo $form->error($model,'section'); ?>
        </div>

        <!--<br>-->
        <br>
        <br>
        <br>

        <div class="row">
            <?php echo $form->labelEx($model,'buying_price'); ?>
            <?php echo $form->textField($model,'buying_price'); ?>
            <?php echo $form->error($model,'buying_price'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model,'sale_price_net'); ?>
            <?php echo $form->textField($model,'sale_price_net'); ?>
            <?php echo $form->error($model,'sale_price_net'); ?>
        </div>

    </div>


    <div class="block2">

        <div class="row">
            <?php echo $form->labelEx($model,'quantity'); ?>
            <?php echo $form->textField($model,'quantity'); ?>
            <?php echo $form->error($model,'quantity'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model,'weight'); ?>
            <?php echo $form->textField($model,'weight',array('size'=>10,'maxlength'=>10)); ?>
            <?php echo $form->error($model,'weight'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model,'bottle_size'); ?>
            <?php echo $form->textField($model,'bottle_size'); ?>
            <?php echo $form->error($model,'bottle_size'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model,'alcohol_concentration'); ?>
            <?php echo $form->textField($model,'alcohol_concentration',array('size'=>5,'maxlength'=>5)); ?>
            <?php echo $form->error($model,'alcohol_concentration'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model,'type'); ?>
            <?php
            echo $form->dropDownList($model,'type',WineType::items(), array(
                'prompt' => '-- Weinart wählen --'
            ));
            ?>
            <?php echo $form->error($model,'type'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model,'fastening'); ?>
            <?php
            echo $form->dropDownList($model,'fastening',Fastening::items(), array(
                'prompt' => '-- Verschlussart wählen --'
            ));
            ?>
            <?php echo $form->error($model,'fastening'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model,'points'); ?>
            <?php echo $form->textField($model,'points',array('size'=>60,'maxlength'=>100)); ?>
            <?php echo $form->error($model,'points'); ?>
        </div>

    </div>

    <div class="clear"></div>
    <!--
        <br>
        <br>
        <br>
        <br>-->
    <br>
    <br>
    <div class="row buttons">
        <?php echo CHtml::submitButton($model->isNewRecord ? 'Anlegen' : 'Speichern'); ?>
    </div>

    <?php $this->endWidget(); ?>

</div><!-- form -->